import Cookies from 'js-cookie'

const TokenKey = 'Authorization'
const UserUnitId = 'user_unit_id'

export function getToken() {
  // return Cookies.get(TokenKey)
  return localStorage.getItem('token')
}

export function setToken(token: string): string | undefined {
  return Cookies.set(TokenKey, token)
}

export function removeToken(): void {
  return Cookies.remove(TokenKey)
}

export function getUserUnitId(): string | undefined {
  return Cookies.get(UserUnitId)
}
